package com.elinkway.infinitemovies.http.parser;

import com.elinkway.infinitemovies.bean.LocationData;

import org.json.JSONObject;

public class LocationParser extends LVideoMobileParser<LocationData> {
	private static final String STATUS = "status";
	private static final String CITY = "city";

	@Override
	public LocationData parse(JSONObject data) throws Exception {
//		if (data.has(STATUS) && "200".equals(data.optString(STATUS))) {
//			LocationData locationData = new LocationData();
//			locationData.setCityinfo(data.optString(CITY));
//			return locationData;
//		}
		LocationData locationData = new LocationData();
		locationData.setCityinfo(data.optString(CITY));
		return locationData;
	}
}
